filter: removed 36 rows (86%), 6 rows remaining
mutate: new variable 'cv' (double) with 6 unique values and 0% NA
new variable 'weight' (double) with 6 unique values and 0% NA
new variable 'weights_cs' (double) with 6 unique values and 0% NA
new variable 'year_sc' (double) with 6 unique values and 0% NA
new variable 'est_sc' (double) with 6 unique values and 0% NA
Model fit by ML ['sdmTMB']
Formula: est_sc ~ year_sc
Mesh: NULL (isotropic covariance)
Data: ind2
Family: Gamma(link = 'log')
Conditional model:
coef.est coef.se
(Intercept) -8.74 0.14
year_sc -0.79 0.15
Dispersion parameter: 8.21
ML criterion at convergence: -50.502
See ?tidy.sdmTMB to extract these values as a data frame.
sanity(mt)
✔ Non-linear minimizer suggests successful convergence
✔ Hessian matrix is positive definite
✔ No extreme or very small eigenvalues detected
✔ No gradients with respect to fixed effects are >= 0.001
✔ No fixed-effect standard errors are NA
✔ No standard errors look unreasonably large
✔ No sigma parameters are < 0.01
✔ No sigma parameters are > 100
Warning in min(x, na.rm = na.rm): no non-missing arguments to min; returning
Inf
Warning in max(x, na.rm = na.rm): no non-missing arguments to max; returning
-Inf
Warning in min(x, na.rm = na.rm): no non-missing arguments to min; returning
Inf
Warning in max(x, na.rm = na.rm): no non-missing arguments to max; returning
-Inf
Prediction can be slow when `se_fit = TRUE` and random fields are included
(i.e., `re_form = NA`). Consider using the `nsim` argument to take draws from
the joint precision matrix and summarizing the standard devation of those
draws.
mutate: no changes
mutate: changed 50 values (100%) of 'est' (0 new NA)
new variable 'lwr' (double) with 50 unique values and 0% NA
new variable 'upr' (double) with 50 unique values and 0% NA
p2 <- ind |>filter(year >2017) |>mutate(period =ifelse(year >2017, "New", "Old")) |>ggplot(aes(year, est, color = period, fill = period)) +geom_line(data = pp, aes(year, est), inherit.aes =FALSE,color =brewer.pal(n =3, name ="Set1")[1], linetype ="longdash") +geom_ribbon(data = pp, aes(year, est, ymin = lwr, ymax = upr), inherit.aes =FALSE,alpha =0.2) +geom_errorbar(aes(ymin = lwr, ymax = upr), width =0) +geom_point() +scale_color_brewer(palette ="Set1", direction =-1) +scale_fill_brewer(palette ="Set1", direction =-1) +guides(color ="none", fill ="none") +labs(y ="Predicted average LFI", x ="Year") +annotate("text", label ="(b)", x =Inf, y =Inf, vjust =2, hjust =1.5,color ="gray40", size =4)
filter: removed 36 rows (86%), 6 rows remaining
mutate: new variable 'period' (character) with one unique value and 0% NA
(p1 / p2) +plot_layout(axes ="collect")
ggsave(paste0(home, "/figures/lfi_index.pdf"), width =14, height =17, units ="cm")
Bias correction is turned off.
It is recommended to turn this on for final inference.
bind_rows( ind |>mutate(prediction ="full"), ind2 |>mutate(prediction ="subset") ) |>ggplot(aes(year, est, color = prediction, fill = prediction)) +geom_ribbon(aes(ymin = lwr, ymax = upr), alpha =0.3, color =NA) +geom_line() +scale_y_continuous(trans ="sqrt") +labs(y ="Predicted average LFI", x ="Year")
mutate: new variable 'prediction' (character) with one unique value and 0% NA
mutate: new variable 'prediction' (character) with one unique value and 0% NA
Bias correction is turned off.
It is recommended to turn this on for final inference.
bind_rows( ind |>mutate(prediction ="full"), ind2 |>mutate(prediction ="subset"), ind3 |>mutate(prediction ="tdepth") ) |>ggplot(aes(year, est, color = prediction, fill = prediction)) +geom_ribbon(aes(ymin = lwr, ymax = upr), alpha =0.3, color =NA) +geom_line() +scale_y_continuous(trans ="sqrt") +scale_color_brewer(palette ="Set2") +scale_fill_brewer(palette ="Set2") +labs(y ="Predicted average LFI", x ="Year")
mutate: new variable 'prediction' (character) with one unique value and 0% NA
mutate: new variable 'prediction' (character) with one unique value and 0% NA
mutate: new variable 'prediction' (character) with one unique value and 0% NA
ggsave(paste0(home, "/figures/lfi_index_sensi.pdf"), width =14, height =11, units ="cm")